Integrand size = 23, antiderivative size = 284 \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\frac {a g \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+p)} \operatorname {Hypergeometric2F1}\left (\frac {1-p}{2},\frac {1-p}{2},\frac {3-p}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin ^2(e+f x)^{\frac {1-p}{2}} (g \tan (e+f x))^{-1+p}}{\left (a^2-b^2\right ) f (-1+p)}+\frac {b \operatorname {AppellF1}\left (\frac {1-p}{2},-\frac {p}{2},1,\frac {3-p}{2},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right ) \cos (e+f x) \sin ^2(e+f x)^{-p/2} (g \tan (e+f x))^p}{\left (-a^2+b^2\right ) f (-1+p)} \]
a*g*(1-b^2*cos(f*x+e)^2/(-a^2+b^2))^(-1/2+1/2*p)*Hypergeometric2F1(1/2-1/2 *p,1/2-1/2*p,3/2-1/2*p,(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+b^2))/(1-b^2*c os(f*x+e)^2/(-a^2+b^2)))*(sin(f*x+e)^2)^(1/2-1/2*p)*(g*tan(f*x+e))^(-1+p)/ (a^2-b^2)/f/(-1+p)+b*AppellF1(1/2-1/2*p,-1/2*p,1,3/2-1/2*p,cos(f*x+e)^2,b^ 2*cos(f*x+e)^2/(-a^2+b^2))*cos(f*x+e)*(g*tan(f*x+e))^p/(-a^2+b^2)/f/(-1+p) /((sin(f*x+e)^2)^(1/2*p))
Leaf count is larger than twice the leaf count of optimal. \(858\) vs. \(2(284)=568\).
Time = 14.05 (sec) , antiderivative size = 858, normalized size of antiderivative = 3.02 \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\frac {\tan ^{1+p}(e+f x) (g \tan (e+f x))^p \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+a \left (b (2+p) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)\right )\right )}{a^2 b f (1+p) (2+p) (a+b \sin (e+f x)) \left (\frac {\sec ^2(e+f x) \tan ^p(e+f x) \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+a \left (b (2+p) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)\right )\right )}{a^2 b (2+p)}+\frac {\tan ^{1+p}(e+f x) \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x)+\left (a^2-b^2\right ) (1+p) \tan (e+f x) \left (\frac {2 \left (-1+\frac {b^2}{a^2}\right ) (2+p) \operatorname {AppellF1}\left (1+\frac {2+p}{2},-\frac {1}{2},2,1+\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{4+p}+\frac {(2+p) \operatorname {AppellF1}\left (1+\frac {2+p}{2},\frac {1}{2},1,1+\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{4+p}\right )+a \left (-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-2 a \left (1+\frac {p}{2}\right ) (1+p) \sec ^2(e+f x) \left (-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right )+\frac {1}{\sqrt {1+\tan ^2(e+f x)}}\right )+b (1+p) (2+p) \csc (e+f x) \sec (e+f x) \left (-\operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )+\frac {1}{1-\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}}\right )\right )\right )}{a^2 b (1+p) (2+p)}\right )} \]
(Tan[e + f*x]^(1 + p)*(g*Tan[e + f*x])^p*((a^2 - b^2)*(1 + p)*AppellF1[(2 + p)/2, -1/2, 1, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2 ]*Tan[e + f*x] + a*(b*(2 + p)*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, ( (-a^2 + b^2)*Tan[e + f*x]^2)/a^2] - a*(1 + p)*Hypergeometric2F1[1/2, 1 + p /2, 2 + p/2, -Tan[e + f*x]^2]*Tan[e + f*x])))/(a^2*b*f*(1 + p)*(2 + p)*(a + b*Sin[e + f*x])*((Sec[e + f*x]^2*Tan[e + f*x]^p*((a^2 - b^2)*(1 + p)*App ellF1[(2 + p)/2, -1/2, 1, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Tan[e + f*x] + a*(b*(2 + p)*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, ((-a^2 + b^2)*Tan[e + f*x]^2)/a^2] - a*(1 + p)*Hypergeometric2F1[1 /2, 1 + p/2, 2 + p/2, -Tan[e + f*x]^2]*Tan[e + f*x])))/(a^2*b*(2 + p)) + ( Tan[e + f*x]^(1 + p)*((a^2 - b^2)*(1 + p)*AppellF1[(2 + p)/2, -1/2, 1, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Sec[e + f*x]^2 + ( a^2 - b^2)*(1 + p)*Tan[e + f*x]*((2*(-1 + b^2/a^2)*(2 + p)*AppellF1[1 + (2 + p)/2, -1/2, 2, 1 + (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f *x]^2]*Sec[e + f*x]^2*Tan[e + f*x])/(4 + p) + ((2 + p)*AppellF1[1 + (2 + p )/2, 1/2, 1, 1 + (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2 ]*Sec[e + f*x]^2*Tan[e + f*x])/(4 + p)) + a*(-(a*(1 + p)*Hypergeometric2F1 [1/2, 1 + p/2, 2 + p/2, -Tan[e + f*x]^2]*Sec[e + f*x]^2) - 2*a*(1 + p/2)*( 1 + p)*Sec[e + f*x]^2*(-Hypergeometric2F1[1/2, 1 + p/2, 2 + p/2, -Tan[e + f*x]^2] + 1/Sqrt[1 + Tan[e + f*x]^2]) + b*(1 + p)*(2 + p)*Csc[e + f*x]*...
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3211 |
\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)}dx\) |
3.3.6.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Unintegrable[(a + b*Sin[e + f*x])^m*(g*Tan[e + f* x])^p, x] /; FreeQ[{a, b, e, f, g, m, p}, x]
\[\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{a +b \sin \left (f x +e \right )}d x\]
\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{a + b \sin {\left (e + f x \right )}}\, dx \]
\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{a+b\,\sin \left (e+f\,x\right )} \,d x \]